package com.mingdong.first.waiguan.hometheater;

public class Stereo {

	public static Stereo instance = null;
	
	private int volumn = 5;
	
	private Stereo(){
		
	}
	
	public static Stereo getInstance(){
		
		if(instance == null){
			instance = new Stereo();
		}
		return instance;
	}
	
	public void setVol(int vol){
		this.volumn = vol;
	}
	
	public void addVol(){
		if(volumn < 11){
			volumn++;
			setVol(volumn);
		}
	}
	public void subVol(){
		if(volumn > 0){
			volumn--;
			setVol(volumn);
		}
	}
}
